<?php
namespace app\common\validate\Product;

use think\Validate;

// 商品分类的验证器
class Type extends Validate
{
    protected $rule =   [
        'name'  => ['require'],
        'weigh'   => ['require','>=:0'],
    ];

    protected $message  =   [
        'name.require' => '分类名称必须填写',
        'weigh.require'     => '分类权重必须填写',
        'weigh.>='   => '分类权重必须大于等于0'  
    ];
}
